import React, { Component, Fragment } from 'react'
import Son from './Son'

export default class Life3 extends Component {
    state = {
        count: 100
    }
    render() {
        return (
            <div>
                <h3>我是父组件</h3>
                <button onClick={() => {
                    this.setState({
                        count: this.state.count + 1
                    })
                }}>+++</button>
                {/* 空标签 1. ''   2.<></>   3.Fragment */}
                {
                    this.state.count > 105? <Fragment></Fragment> : <Son count = { this.state.count }/>
                }
                
            </div>
        )
    }
}
